//引入axios
import request from "@/utils/request";
//获取部门列表接口
export const getDepartmentList = ()=>request.get('/company/department')
//获取部门负责人列表数据
export const getDepartmentLeaderList = ()=>request.get('/sys/user/simple')
//新增或者修改部门的接口
export const addOrUpdateDepartment = (data)=>{
    if(data.id) {
        return request.put('/company/department/'+data.id,data)
    }else {
        return request.post('/company/department',data)
    }
}
//获取部门详细
export const getDepartmentDetail = (id)=>request.get('/company/department/'+id)
//删除部门的回调
export const deleteDepartment = (id)=>request.delete('/company/department/'+id)